{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "bf1e7ddf",
   "metadata": {},
   "source": [
    "# 本周学习目标\n",
    "\n",
    "> 1. 字典的方法\n",
    "> 2. 实践"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "1c7b79a7",
   "metadata": {},
   "outputs": [],
   "source": [
    "user_list = {\n",
    "    1800001:\"jack\",\n",
    "    1800002:\"marry\",\n",
    "    1800003:\"alex\",\n",
    "    1800004:\"小明\"\n",
    "    \n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "0e065619",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{1800001: 'jack', 1800002: 'marry', 1800003: 'alex', 1800004: '小明'} <class 'dict'>\n"
     ]
    }
   ],
   "source": [
    "print(user_list,type(user_list))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "27be8067",
   "metadata": {},
   "outputs": [
    {
     "ename": "KeyError",
     "evalue": "0",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "Input \u001b[1;32mIn [16]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43muser_list\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\n",
      "\u001b[1;31mKeyError\u001b[0m: 0"
     ]
    }
   ],
   "source": [
    "user_list[0] # 证明字典是无序的，没办法用索引值"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a093a162",
   "metadata": {},
   "source": [
    "## 1.字典的方法"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ed87f637",
   "metadata": {},
   "source": [
    "* len()查看长度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "a3906564",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(user_list)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5a9cd16f",
   "metadata": {},
   "source": [
    "* in 查询成员是否存在: 查询的是key是否存在"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "073d147b",
   "metadata": {},
   "source": [
    "###"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "64c0309c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1800001 in user_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "91e7890f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'jack'"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "user_list[1800001]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "7dcf20d2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1800007 in user_list"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "da69c3cd",
   "metadata": {},
   "source": [
    "### 1.2 字典的一些方法\n",
    "> 1. 增删改查"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fe3ffdef",
   "metadata": {},
   "source": [
    "* 字典增加\n",
    "\n",
    "> 1. 先查询要增加的key是否存在"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "5b75da6d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1800001: 'jack', 1800002: 'marry', 1800003: 'alex', 1800004: '小明'}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "user_list = {\n",
    "    1800001:\"jack\",\n",
    "    1800002:\"marry\",\n",
    "    1800003:\"alex\",\n",
    "    1800004:\"小明\"\n",
    "}\n",
    "user_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "35bba039",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "增加成功\n"
     ]
    }
   ],
   "source": [
    "# 可以避免替换其他的 key:value !\n",
    "if 1800005 in user_list:\n",
    "    print(\"该用户已存在，请更换key\")\n",
    "else:\n",
    "    user_list[1800005] = \"李明\"\n",
    "    print(\"增加成功\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "9b02f39c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "增加成功\n"
     ]
    }
   ],
   "source": [
    "if 1800006 in user_list:\n",
    "    print(\"该用户已存在，请更换key\")\n",
    "else:\n",
    "    user_list[1800006] = \"李华\"\n",
    "    print(\"增加成功\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "22c63200",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1800001: 'jack',\n",
       " 1800002: 'marry',\n",
       " 1800003: 'alex',\n",
       " 1800004: '小明',\n",
       " 1800005: '李明',\n",
       " 1800006: '李华'}"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "user_list"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c96b106e",
   "metadata": {},
   "source": [
    "* 字典的修改\n",
    "> 1. 先查询要增加的key是否存在\n",
    "> 2. 如果不存在该key,可能需要考虑是否新增用户"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "83caad4b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "信息更新成功\n"
     ]
    }
   ],
   "source": [
    "if 1800001 in user_list:\n",
    "    user_list[1800001] = \"jan\"\n",
    "    print(\"信息更新成功\")\n",
    "else:\n",
    "    print(\"该key找不到\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "282c9c65",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1800001: 'jan',\n",
       " 1800002: 'marry',\n",
       " 1800003: 'alex',\n",
       " 1800004: '小明',\n",
       " 1800005: '李明'}"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "user_list"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b0dd1130",
   "metadata": {},
   "source": [
    "* 字典的查询： get() 可以查询到key的结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "9df71ddb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'jan'"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "user_list.get(1800001)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "55bccbd0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "print(user_list.get(1800007))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7490821c",
   "metadata": {},
   "source": [
    "### 1.2 字典的一般方法"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f0f6e837",
   "metadata": {},
   "source": [
    "* 字典的循环遍历"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "471f5651",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 回顾: 关于序列类型的数据 循环\n",
    "strings = \"hello world\"\n",
    "lsits = [18,19,18,20,19]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "5b187ab1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "h\n",
      "e\n",
      "l\n",
      "l\n",
      "o\n",
      " \n",
      "w\n",
      "o\n",
      "r\n",
      "l\n",
      "d\n"
     ]
    }
   ],
   "source": [
    "for i in strings:\n",
    "    print(i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "610464a3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "18\n",
      "19\n",
      "18\n",
      "20\n",
      "19\n"
     ]
    }
   ],
   "source": [
    "for i in lsits:\n",
    "    print(i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "13295702",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_items([(1800001, 'jan'), (1800002, 'marry'), (1800003, 'alex'), (1800004, '小明')])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "user_list.items()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "fa44c4ba",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1800001 jan\n",
      "1800002 marry\n",
      "1800003 alex\n",
      "1800004 小明\n"
     ]
    }
   ],
   "source": [
    "# 字典的循环\n",
    "for k,v in user_list.items():\n",
    "    print(k,v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "9a5b5ce2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys([1800001, 1800002, 1800003, 1800004])"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# dict.keys() : 取出全部的key\n",
    "user_list.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "1177e7c1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1800001\n",
      "1800002\n",
      "1800003\n",
      "1800004\n"
     ]
    }
   ],
   "source": [
    "for i in user_list.keys():\n",
    "    print(i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "a2275476",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_values(['jan', 'marry', 'alex', '小明'])"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# dict.values():取出全部的values\n",
    "user_list.values()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "52a35b69",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "jan\n",
      "marry\n",
      "alex\n",
      "小明\n"
     ]
    }
   ],
   "source": [
    "for i in user_list.values():\n",
    "    print(i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "911d908a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1800004, '小明')"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# popitem() 随机删除1个\n",
    "user_list.popitem()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "e23a24ee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1800001: 'jack', 1800002: 'marry', 1800003: 'alex'}"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "user_list"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8ac8fdf0",
   "metadata": {},
   "source": [
    "### 字典的高级用法\n",
    "* fromkeys\n",
    "* setdefault"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "d45b23e3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on built-in function fromkeys:\n",
      "\n",
      "fromkeys(iterable, value=None, /) method of builtins.type instance\n",
      "    Create a new dictionary with keys from iterable and values set to value.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# 复位，重启，重置\n",
    "help(user_list.fromkeys)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "33334d5b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'jan': 100, 'marry': 100, 'alex': 100}"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 重置系统人物的属性，所有人族hp10\n",
    "user_list.values()\n",
    "re_game = {}\n",
    "re_game.fromkeys(user_list.values(),100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "ce85bd57",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on built-in function setdefault:\n",
      "\n",
      "setdefault(key, default=None, /) method of builtins.dict instance\n",
      "    Insert key with a value of default if key is not in the dictionary.\n",
      "    \n",
      "    Return the value for key if key is in the dictionary, else default.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(user_list.setdefault)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "7c06213f",
   "metadata": {},
   "outputs": [],
   "source": [
    "books = {\"runoob\":\"菜鸟教程\",\"google\":\"google 搜索\"}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "956408aa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'菜鸟教程'"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "books.setdefault(\"runoob\",\"菜鸟阅读\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "id": "7fd8a785",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'阿里阅读'"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "books.setdefault(\"alibaba\",\"阿里阅读\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "157660a1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'runoob': '菜鸟教程', 'google': 'google 搜索', 'alibaba': '阿里阅读'}"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "books"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "f7842091",
   "metadata": {},
   "outputs": [],
   "source": [
    "NFU = {\"status\":\"1\",\"regeocode\":{\"roads\":[{\"id\":\"020F49F0050461206\",\"location\":\"113.678,23.6284\",\"direction\":\"北\",\"name\":\"博学路\",\"distance\":\"7.63232\"},{\"id\":\"020F49F0050462229\",\"location\":\"113.679,23.6245\",\"direction\":\"北\",\"name\":\"老虎形街\",\"distance\":\"445.159\"},{\"id\":\"020F49F0050462451\",\"location\":\"113.677,23.6347\",\"direction\":\"南\",\"name\":\"中山路\",\"distance\":\"708.299\"}],\"roadinters\":[{\"second_name\":\"中山路\",\"first_id\":\"020F49F0050461206\",\"second_id\":\"020F49F0050462451\",\"location\":\"113.676794,23.634661\",\"distance\":\"708.299\",\"first_name\":\"博学路\",\"direction\":\"南\"}],\"formatted_address\":\"广东省广州市从化区温泉镇博学路广州南方学院\",\"addressComponent\":{\"city\":\"广州市\",\"province\":\"广东省\",\"adcode\":\"440117\",\"district\":\"从化区\",\"towncode\":\"440117100000\",\"streetNumber\":{\"number\":\"24号\",\"location\":\"113.677267,23.629149\",\"direction\":\"西北\",\"distance\":\"129.943\",\"street\":\"博学路\"},\"country\":\"中国\",\"township\":\"温泉镇\",\"businessAreas\":[[]],\"building\":{\"name\":[],\"type\":[]},\"neighborhood\":{\"name\":[],\"type\":[]},\"citycode\":\"020\"},\"aois\":[{\"area\":\"528560.656426\",\"type\":\"141201\",\"id\":\"B00140MR9A\",\"location\":\"113.679257,23.632577\",\"adcode\":\"440117\",\"name\":\"广州南方学院\",\"distance\":\"0\"}],\"pois\":[{\"id\":\"B00140MR9A\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"温泉大道882号\",\"poiweight\":\"0.450402\",\"name\":\"广州南方学院\",\"location\":\"113.679257,23.632577\",\"distance\":\"470.792\",\"tel\":[],\"type\":\"科教文化服务;学校;高等院校\"},{\"id\":\"B0FFG4TAF2\",\"direction\":\"东南\",\"businessarea\":[],\"address\":\"温泉镇乌土村松浪队5号(近博学路)\",\"poiweight\":\"0.237309\",\"name\":\"广州南方公寓\",\"location\":\"113.678983,23.627778\",\"distance\":\"102.617\",\"tel\":\"13622768437\",\"type\":\"商务住宅;商务住宅相关;商务住宅相关\"},{\"id\":\"B0H6FA18J5\",\"direction\":\"东南\",\"businessarea\":[],\"address\":\"从莞深高速(广州南方学院南侧)\",\"poiweight\":\"0.223065\",\"name\":\"保利半山花园\",\"location\":\"113.679348,23.627551\",\"distance\":\"146.921\",\"tel\":[],\"type\":\"商务住宅;住宅区;住宅区\"},{\"id\":\"B0HGD588HJ\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"博学路\",\"poiweight\":\"0.221662\",\"name\":\"广州南方学院教学楼4号\",\"location\":\"113.677460,23.630490\",\"distance\":\"242.901\",\"tel\":[],\"type\":\"科教文化服务;学校;学校\"},{\"id\":\"B0FFIMHNV3\",\"direction\":\"东\",\"businessarea\":[],\"address\":\"保利半山花园西北侧110米\",\"poiweight\":\"0.213931\",\"name\":\"汉堡小亨(广州南方学院分店)\",\"location\":\"113.678653,23.628407\",\"distance\":\"38.1716\",\"tel\":\"18825152009\",\"type\":\"餐饮服务;快餐厅;快餐厅\"},{\"id\":\"B0FFM1K4PF\",\"direction\":\"东\",\"businessarea\":[],\"address\":\"保利桃花源(温泉镇中山大学南方学院后门)\",\"poiweight\":\"0.272494\",\"name\":\"南苑小筑沈阳师兄\",\"location\":\"113.678570,23.628390\",\"distance\":\"30.0405\",\"tel\":\"+862126137886,6625081\",\"type\":\"住宿服务;住宿服务相关;住宿服务相关\"},{\"id\":\"B00140TWHT\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"笃行路2号\",\"poiweight\":\"0.157653\",\"name\":\"教工住宅1号\",\"location\":\"113.678490,23.630432\",\"distance\":\"222.658\",\"tel\":[],\"type\":\"商务住宅;住宅区;住宅小区\"},{\"id\":\"B0FFHRJDM9\",\"direction\":\"东南\",\"businessarea\":[],\"address\":\"中大南方学院南门1号\",\"poiweight\":\"0.256152\",\"name\":\"中南公寓\",\"location\":\"113.680340,23.627566\",\"distance\":\"231.223\",\"tel\":\"13711245345\",\"type\":\"商务住宅;住宅区;住宅小区\"},{\"id\":\"B0HGDU76L2\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"博学路\",\"poiweight\":\"0.221662\",\"name\":\"广州南方学院2号实验楼\",\"location\":\"113.678211,23.630956\",\"distance\":\"280.003\",\"tel\":[],\"type\":\"科教文化服务;学校;学校\"},{\"id\":\"B0FFHC4XU0\",\"direction\":\"东北\",\"businessarea\":[],\"address\":\"温泉大道886号\",\"poiweight\":\"0.191595\",\"name\":\"中山大学南方学院学术交流中心\",\"location\":\"113.679959,23.630496\",\"distance\":\"285.635\",\"tel\":[],\"type\":\"科教文化服务;科教文化场所;科教文化场所\"},{\"id\":\"B0FFLF90I2\",\"direction\":\"东北\",\"businessarea\":[],\"address\":\"笃行路20、22、24号广州南方学院商业中心1层1F015\",\"poiweight\":\"0.209448\",\"name\":\"煌上煌酱鸭(广州南方学院店)\",\"location\":\"113.679965,23.630156\",\"distance\":\"256.772\",\"tel\":\"13712317721\",\"type\":\"餐饮服务;快餐厅;快餐厅\"},{\"id\":\"B0FFKP838K\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"博学路25号\",\"poiweight\":\"0.191742\",\"name\":\"教学楼3号(外国语学院)\",\"location\":\"113.677247,23.630947\",\"distance\":\"298.093\",\"tel\":[],\"type\":\"科教文化服务;学校;高等院校\"},{\"id\":\"B0FFL7NUA2\",\"direction\":\"东北\",\"businessarea\":[],\"address\":\"广州南方学院\",\"poiweight\":\"0.224259\",\"name\":\"湖边纸包鱼\",\"location\":\"113.679861,23.630285\",\"distance\":\"260.939\",\"tel\":\"13924024938\",\"type\":\"餐饮服务;中餐厅;四川菜(川菜)\"},{\"id\":\"B0IB2GMPW4\",\"direction\":\"东北\",\"businessarea\":[],\"address\":\"温泉镇笃行路20、22、24号中山大学南方学院商业中心一楼1F-005\",\"poiweight\":\"0.218331\",\"name\":\"古茗(南方学院店)\",\"location\":\"113.680105,23.630681\",\"distance\":\"311.024\",\"tel\":\"18027267535\",\"type\":\"餐饮服务;休闲餐饮场所;休闲餐饮场所\"},{\"id\":\"B0HGDU8NLD\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"博学路附近\",\"poiweight\":\"0.221662\",\"name\":\"广州南方学院1号实验楼\",\"location\":\"113.678215,23.631370\",\"distance\":\"326.007\",\"tel\":[],\"type\":\"科教文化服务;学校;学校\"},{\"id\":\"B0HGD58UTU\",\"direction\":\"西北\",\"businessarea\":[],\"address\":\"博学路\",\"poiweight\":\"0.191229\",\"name\":\"广州南方学院2号教学楼\",\"location\":\"113.677060,23.631346\",\"distance\":\"346.352\",\"tel\":[],\"type\":\"科教文化服务;学校;学校\"},{\"id\":\"B0H25SMRKP\",\"direction\":\"东北\",\"businessarea\":[],\"address\":\"温泉大道882号\",\"poiweight\":\"0.263595\",\"name\":\"广州南方学院大礼堂\",\"location\":\"113.680076,23.631502\",\"distance\":\"386.65\",\"tel\":[],\"type\":\"科教文化服务;会展中心;会展中心\"},{\"id\":\"B0HGDU92JD\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"博学路19号\",\"poiweight\":\"0.221662\",\"name\":\"广州南方学院教学楼1号\",\"location\":\"113.677077,23.631783\",\"distance\":\"391.548\",\"tel\":[],\"type\":\"科教文化服务;学校;学校\"},{\"id\":\"B0HGD592BJ\",\"direction\":\"东北\",\"businessarea\":[],\"address\":\"温泉大道886号广州南方学院内\",\"poiweight\":\"0.221662\",\"name\":\"广州南方学院综合楼\",\"location\":\"113.680117,23.631544\",\"distance\":\"392.731\",\"tel\":[],\"type\":\"科教文化服务;学校;学校\"},{\"id\":\"B0FFKP81F0\",\"direction\":\"西北\",\"businessarea\":[],\"address\":\"博学路与中山路交叉口南340米\",\"poiweight\":\"0.191742\",\"name\":\"教学楼1号(文学与传媒学院)\",\"location\":\"113.676866,23.631736\",\"distance\":\"393.93\",\"tel\":[],\"type\":\"科教文化服务;科教文化场所;科教文化场所\"},{\"id\":\"B0FFLBEOND\",\"direction\":\"东北\",\"businessarea\":[],\"address\":\"从莞深高速(广州南方学院)\",\"poiweight\":\"0.190963\",\"name\":\"聚贤楼10号\",\"location\":\"113.681253,23.631036\",\"distance\":\"418.51\",\"tel\":[],\"type\":\"商务住宅;住宅区;宿舍\"},{\"id\":\"B0FFH6K3U9\",\"direction\":\"西北\",\"businessarea\":[],\"address\":\"温泉镇温泉大道882号广州南方学院H7栋1-5层\",\"poiweight\":\"0.254885\",\"name\":\"广州中大南方招待所\",\"location\":\"113.676330,23.631332\",\"distance\":\"378.102\",\"tel\":\"020-61787222\",\"type\":\"住宿服务;住宿服务相关;住宿服务相关\"},{\"id\":\"B0HGD58NF8\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"温泉大道882号广州南方学院新综合楼2层\",\"poiweight\":\"0.191229\",\"name\":\"广州南方学院达人书院\",\"location\":\"113.679041,23.632392\",\"distance\":\"446.366\",\"tel\":[],\"type\":\"科教文化服务;科教文化场所;科教文化场所\"},{\"id\":\"B0FFKUVYWV\",\"direction\":\"东北\",\"businessarea\":[],\"address\":\"保利桃花源\",\"poiweight\":\"0.273168\",\"name\":\"广州和风庭阿七度假别墅\",\"location\":\"113.681736,23.630569\",\"distance\":\"424.35\",\"tel\":\"+862126137886,4618482\",\"type\":\"住宿服务;住宿服务相关;住宿服务相关\"},{\"id\":\"B0FFIXV3OZ\",\"direction\":\"西北\",\"businessarea\":[],\"address\":\"温泉镇广州南方学院博学路6号\",\"poiweight\":\"0.182221\",\"name\":\"广州南方学院第一食堂\",\"location\":\"113.675848,23.631818\",\"distance\":\"450.091\",\"tel\":[],\"type\":\"餐饮服务;中餐厅;中餐厅\"},{\"id\":\"B0FFL7C054\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"温泉镇博学路882号(广州南方学院商业中心1层)\",\"poiweight\":\"0.317505\",\"name\":\"广州U优森特酒店\",\"location\":\"113.679226,23.632528\",\"distance\":\"464.819\",\"tel\":\"15813395296\",\"type\":\"住宿服务;住宿服务相关;住宿服务相关\"},{\"id\":\"B0HGDU92JC\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"博学路附近\",\"poiweight\":\"0.221662\",\"name\":\"广州南方学院4号实验楼\",\"location\":\"113.679963,23.632652\",\"distance\":\"498.883\",\"tel\":[],\"type\":\"科教文化服务;学校;学校\"},{\"id\":\"B0HGDU99RM\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"温泉大道882号广州南方学院内\",\"poiweight\":\"0.257947\",\"name\":\"广州南方学院图书馆\",\"location\":\"113.679177,23.632762\",\"distance\":\"489.331\",\"tel\":\"020-61787368;020-61787371\",\"type\":\"科教文化服务;图书馆;图书馆\"},{\"id\":\"B0FFHHKASW\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"温泉镇广州南方学院后门润泰超市1层\",\"poiweight\":\"0.210069\",\"name\":\"栗子家蛋糕店\",\"location\":\"113.679283,23.632574\",\"distance\":\"471.03\",\"tel\":[],\"type\":\"餐饮服务;糕饼店;糕饼店\"},{\"id\":\"B0FFK28XPU\",\"direction\":\"北\",\"businessarea\":[],\"address\":\"博学路广州南方学院后门润泰超市首层23号\",\"poiweight\":\"0.213875\",\"name\":\"我家厨房\",\"location\":\"113.679291,23.632563\",\"distance\":\"470.033\",\"tel\":[],\"type\":\"餐饮服务;中餐厅;中餐厅\"}]},\"info\":\"OK\",\"infocode\":\"10000\"}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "b2f55634",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'roads': [{'id': '020F49F0050461206',\n",
       "    'location': '113.678,23.6284',\n",
       "    'direction': '北',\n",
       "    'name': '博学路',\n",
       "    'distance': '7.63232'},\n",
       "   {'id': '020F49F0050462229',\n",
       "    'location': '113.679,23.6245',\n",
       "    'direction': '北',\n",
       "    'name': '老虎形街',\n",
       "    'distance': '445.159'},\n",
       "   {'id': '020F49F0050462451',\n",
       "    'location': '113.677,23.6347',\n",
       "    'direction': '南',\n",
       "    'name': '中山路',\n",
       "    'distance': '708.299'}],\n",
       "  'roadinters': [{'second_name': '中山路',\n",
       "    'first_id': '020F49F0050461206',\n",
       "    'second_id': '020F49F0050462451',\n",
       "    'location': '113.676794,23.634661',\n",
       "    'distance': '708.299',\n",
       "    'first_name': '博学路',\n",
       "    'direction': '南'}],\n",
       "  'formatted_address': '广东省广州市从化区温泉镇博学路广州南方学院',\n",
       "  'addressComponent': {'city': '广州市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440117',\n",
       "   'district': '从化区',\n",
       "   'towncode': '440117100000',\n",
       "   'streetNumber': {'number': '24号',\n",
       "    'location': '113.677267,23.629149',\n",
       "    'direction': '西北',\n",
       "    'distance': '129.943',\n",
       "    'street': '博学路'},\n",
       "   'country': '中国',\n",
       "   'township': '温泉镇',\n",
       "   'businessAreas': [[]],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '020'},\n",
       "  'aois': [{'area': '528560.656426',\n",
       "    'type': '141201',\n",
       "    'id': 'B00140MR9A',\n",
       "    'location': '113.679257,23.632577',\n",
       "    'adcode': '440117',\n",
       "    'name': '广州南方学院',\n",
       "    'distance': '0'}],\n",
       "  'pois': [{'id': 'B00140MR9A',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道882号',\n",
       "    'poiweight': '0.450402',\n",
       "    'name': '广州南方学院',\n",
       "    'location': '113.679257,23.632577',\n",
       "    'distance': '470.792',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;高等院校'},\n",
       "   {'id': 'B0FFG4TAF2',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉镇乌土村松浪队5号(近博学路)',\n",
       "    'poiweight': '0.237309',\n",
       "    'name': '广州南方公寓',\n",
       "    'location': '113.678983,23.627778',\n",
       "    'distance': '102.617',\n",
       "    'tel': '13622768437',\n",
       "    'type': '商务住宅;商务住宅相关;商务住宅相关'},\n",
       "   {'id': 'B0H6FA18J5',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '从莞深高速(广州南方学院南侧)',\n",
       "    'poiweight': '0.223065',\n",
       "    'name': '保利半山花园',\n",
       "    'location': '113.679348,23.627551',\n",
       "    'distance': '146.921',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;住宅区'},\n",
       "   {'id': 'B0HGD588HJ',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221662',\n",
       "    'name': '广州南方学院教学楼4号',\n",
       "    'location': '113.677460,23.630490',\n",
       "    'distance': '242.901',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;学校'},\n",
       "   {'id': 'B0FFIMHNV3',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '保利半山花园西北侧110米',\n",
       "    'poiweight': '0.213931',\n",
       "    'name': '汉堡小亨(广州南方学院分店)',\n",
       "    'location': '113.678653,23.628407',\n",
       "    'distance': '38.1716',\n",
       "    'tel': '18825152009',\n",
       "    'type': '餐饮服务;快餐厅;快餐厅'},\n",
       "   {'id': 'B0FFM1K4PF',\n",
       "    'direction': '东',\n",
       "    'businessarea': [],\n",
       "    'address': '保利桃花源(温泉镇中山大学南方学院后门)',\n",
       "    'poiweight': '0.272494',\n",
       "    'name': '南苑小筑沈阳师兄',\n",
       "    'location': '113.678570,23.628390',\n",
       "    'distance': '30.0405',\n",
       "    'tel': '+862126137886,6625081',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "   {'id': 'B00140TWHT',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '笃行路2号',\n",
       "    'poiweight': '0.157653',\n",
       "    'name': '教工住宅1号',\n",
       "    'location': '113.678490,23.630432',\n",
       "    'distance': '222.658',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;住宅小区'},\n",
       "   {'id': 'B0FFHRJDM9',\n",
       "    'direction': '东南',\n",
       "    'businessarea': [],\n",
       "    'address': '中大南方学院南门1号',\n",
       "    'poiweight': '0.256152',\n",
       "    'name': '中南公寓',\n",
       "    'location': '113.680340,23.627566',\n",
       "    'distance': '231.223',\n",
       "    'tel': '13711245345',\n",
       "    'type': '商务住宅;住宅区;住宅小区'},\n",
       "   {'id': 'B0HGDU76L2',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221662',\n",
       "    'name': '广州南方学院2号实验楼',\n",
       "    'location': '113.678211,23.630956',\n",
       "    'distance': '280.003',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;学校'},\n",
       "   {'id': 'B0FFHC4XU0',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道886号',\n",
       "    'poiweight': '0.191595',\n",
       "    'name': '中山大学南方学院学术交流中心',\n",
       "    'location': '113.679959,23.630496',\n",
       "    'distance': '285.635',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFLF90I2',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '笃行路20、22、24号广州南方学院商业中心1层1F015',\n",
       "    'poiweight': '0.209448',\n",
       "    'name': '煌上煌酱鸭(广州南方学院店)',\n",
       "    'location': '113.679965,23.630156',\n",
       "    'distance': '256.772',\n",
       "    'tel': '13712317721',\n",
       "    'type': '餐饮服务;快餐厅;快餐厅'},\n",
       "   {'id': 'B0FFKP838K',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路25号',\n",
       "    'poiweight': '0.191742',\n",
       "    'name': '教学楼3号(外国语学院)',\n",
       "    'location': '113.677247,23.630947',\n",
       "    'distance': '298.093',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;高等院校'},\n",
       "   {'id': 'B0FFL7NUA2',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '广州南方学院',\n",
       "    'poiweight': '0.224259',\n",
       "    'name': '湖边纸包鱼',\n",
       "    'location': '113.679861,23.630285',\n",
       "    'distance': '260.939',\n",
       "    'tel': '13924024938',\n",
       "    'type': '餐饮服务;中餐厅;四川菜(川菜)'},\n",
       "   {'id': 'B0IB2GMPW4',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉镇笃行路20、22、24号中山大学南方学院商业中心一楼1F-005',\n",
       "    'poiweight': '0.218331',\n",
       "    'name': '古茗(南方学院店)',\n",
       "    'location': '113.680105,23.630681',\n",
       "    'distance': '311.024',\n",
       "    'tel': '18027267535',\n",
       "    'type': '餐饮服务;休闲餐饮场所;休闲餐饮场所'},\n",
       "   {'id': 'B0HGDU8NLD',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.221662',\n",
       "    'name': '广州南方学院1号实验楼',\n",
       "    'location': '113.678215,23.631370',\n",
       "    'distance': '326.007',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;学校'},\n",
       "   {'id': 'B0HGD58UTU',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.191229',\n",
       "    'name': '广州南方学院2号教学楼',\n",
       "    'location': '113.677060,23.631346',\n",
       "    'distance': '346.352',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;学校'},\n",
       "   {'id': 'B0H25SMRKP',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道882号',\n",
       "    'poiweight': '0.263595',\n",
       "    'name': '广州南方学院大礼堂',\n",
       "    'location': '113.680076,23.631502',\n",
       "    'distance': '386.65',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;会展中心;会展中心'},\n",
       "   {'id': 'B0HGDU92JD',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路19号',\n",
       "    'poiweight': '0.221662',\n",
       "    'name': '广州南方学院教学楼1号',\n",
       "    'location': '113.677077,23.631783',\n",
       "    'distance': '391.548',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;学校'},\n",
       "   {'id': 'B0HGD592BJ',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道886号广州南方学院内',\n",
       "    'poiweight': '0.221662',\n",
       "    'name': '广州南方学院综合楼',\n",
       "    'location': '113.680117,23.631544',\n",
       "    'distance': '392.731',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;学校'},\n",
       "   {'id': 'B0FFKP81F0',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路与中山路交叉口南340米',\n",
       "    'poiweight': '0.191742',\n",
       "    'name': '教学楼1号(文学与传媒学院)',\n",
       "    'location': '113.676866,23.631736',\n",
       "    'distance': '393.93',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFLBEOND',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '从莞深高速(广州南方学院)',\n",
       "    'poiweight': '0.190963',\n",
       "    'name': '聚贤楼10号',\n",
       "    'location': '113.681253,23.631036',\n",
       "    'distance': '418.51',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;宿舍'},\n",
       "   {'id': 'B0FFH6K3U9',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉镇温泉大道882号广州南方学院H7栋1-5层',\n",
       "    'poiweight': '0.254885',\n",
       "    'name': '广州中大南方招待所',\n",
       "    'location': '113.676330,23.631332',\n",
       "    'distance': '378.102',\n",
       "    'tel': '020-61787222',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "   {'id': 'B0HGD58NF8',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道882号广州南方学院新综合楼2层',\n",
       "    'poiweight': '0.191229',\n",
       "    'name': '广州南方学院达人书院',\n",
       "    'location': '113.679041,23.632392',\n",
       "    'distance': '446.366',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B0FFKUVYWV',\n",
       "    'direction': '东北',\n",
       "    'businessarea': [],\n",
       "    'address': '保利桃花源',\n",
       "    'poiweight': '0.273168',\n",
       "    'name': '广州和风庭阿七度假别墅',\n",
       "    'location': '113.681736,23.630569',\n",
       "    'distance': '424.35',\n",
       "    'tel': '+862126137886,4618482',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "   {'id': 'B0FFIXV3OZ',\n",
       "    'direction': '西北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉镇广州南方学院博学路6号',\n",
       "    'poiweight': '0.182221',\n",
       "    'name': '广州南方学院第一食堂',\n",
       "    'location': '113.675848,23.631818',\n",
       "    'distance': '450.091',\n",
       "    'tel': [],\n",
       "    'type': '餐饮服务;中餐厅;中餐厅'},\n",
       "   {'id': 'B0FFL7C054',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉镇博学路882号(广州南方学院商业中心1层)',\n",
       "    'poiweight': '0.317505',\n",
       "    'name': '广州U优森特酒店',\n",
       "    'location': '113.679226,23.632528',\n",
       "    'distance': '464.819',\n",
       "    'tel': '15813395296',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "   {'id': 'B0HGDU92JC',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.221662',\n",
       "    'name': '广州南方学院4号实验楼',\n",
       "    'location': '113.679963,23.632652',\n",
       "    'distance': '498.883',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;学校;学校'},\n",
       "   {'id': 'B0HGDU99RM',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉大道882号广州南方学院内',\n",
       "    'poiweight': '0.257947',\n",
       "    'name': '广州南方学院图书馆',\n",
       "    'location': '113.679177,23.632762',\n",
       "    'distance': '489.331',\n",
       "    'tel': '020-61787368;020-61787371',\n",
       "    'type': '科教文化服务;图书馆;图书馆'},\n",
       "   {'id': 'B0FFHHKASW',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '温泉镇广州南方学院后门润泰超市1层',\n",
       "    'poiweight': '0.210069',\n",
       "    'name': '栗子家蛋糕店',\n",
       "    'location': '113.679283,23.632574',\n",
       "    'distance': '471.03',\n",
       "    'tel': [],\n",
       "    'type': '餐饮服务;糕饼店;糕饼店'},\n",
       "   {'id': 'B0FFK28XPU',\n",
       "    'direction': '北',\n",
       "    'businessarea': [],\n",
       "    'address': '博学路广州南方学院后门润泰超市首层23号',\n",
       "    'poiweight': '0.213875',\n",
       "    'name': '我家厨房',\n",
       "    'location': '113.679291,23.632563',\n",
       "    'distance': '470.033',\n",
       "    'tel': [],\n",
       "    'type': '餐饮服务;中餐厅;中餐厅'}]},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "NFU"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e7a94ec3",
   "metadata": {},
   "source": [
    "### 1. 请找出NFU这个字典的所有key\n",
    "* 字典的嵌套"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "a11a5b93",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 梦的第一层：NFU"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "930cfad0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['status', 'regeocode', 'info', 'infocode'])"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "NFU.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "f1f19a0e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 梦的第二层"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "98c77f51",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'1'"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "NFU[\"status\"]  # status 到最底层了"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "e2d4f7aa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'roads': [{'id': '020F49F0050461206',\n",
       "   'location': '113.678,23.6284',\n",
       "   'direction': '北',\n",
       "   'name': '博学路',\n",
       "   'distance': '7.63232'},\n",
       "  {'id': '020F49F0050462229',\n",
       "   'location': '113.679,23.6245',\n",
       "   'direction': '北',\n",
       "   'name': '老虎形街',\n",
       "   'distance': '445.159'},\n",
       "  {'id': '020F49F0050462451',\n",
       "   'location': '113.677,23.6347',\n",
       "   'direction': '南',\n",
       "   'name': '中山路',\n",
       "   'distance': '708.299'}],\n",
       " 'roadinters': [{'second_name': '中山路',\n",
       "   'first_id': '020F49F0050461206',\n",
       "   'second_id': '020F49F0050462451',\n",
       "   'location': '113.676794,23.634661',\n",
       "   'distance': '708.299',\n",
       "   'first_name': '博学路',\n",
       "   'direction': '南'}],\n",
       " 'formatted_address': '广东省广州市从化区温泉镇博学路广州南方学院',\n",
       " 'addressComponent': {'city': '广州市',\n",
       "  'province': '广东省',\n",
       "  'adcode': '440117',\n",
       "  'district': '从化区',\n",
       "  'towncode': '440117100000',\n",
       "  'streetNumber': {'number': '24号',\n",
       "   'location': '113.677267,23.629149',\n",
       "   'direction': '西北',\n",
       "   'distance': '129.943',\n",
       "   'street': '博学路'},\n",
       "  'country': '中国',\n",
       "  'township': '温泉镇',\n",
       "  'businessAreas': [[]],\n",
       "  'building': {'name': [], 'type': []},\n",
       "  'neighborhood': {'name': [], 'type': []},\n",
       "  'citycode': '020'},\n",
       " 'aois': [{'area': '528560.656426',\n",
       "   'type': '141201',\n",
       "   'id': 'B00140MR9A',\n",
       "   'location': '113.679257,23.632577',\n",
       "   'adcode': '440117',\n",
       "   'name': '广州南方学院',\n",
       "   'distance': '0'}],\n",
       " 'pois': [{'id': 'B00140MR9A',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉大道882号',\n",
       "   'poiweight': '0.450402',\n",
       "   'name': '广州南方学院',\n",
       "   'location': '113.679257,23.632577',\n",
       "   'distance': '470.792',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;学校;高等院校'},\n",
       "  {'id': 'B0FFG4TAF2',\n",
       "   'direction': '东南',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉镇乌土村松浪队5号(近博学路)',\n",
       "   'poiweight': '0.237309',\n",
       "   'name': '广州南方公寓',\n",
       "   'location': '113.678983,23.627778',\n",
       "   'distance': '102.617',\n",
       "   'tel': '13622768437',\n",
       "   'type': '商务住宅;商务住宅相关;商务住宅相关'},\n",
       "  {'id': 'B0H6FA18J5',\n",
       "   'direction': '东南',\n",
       "   'businessarea': [],\n",
       "   'address': '从莞深高速(广州南方学院南侧)',\n",
       "   'poiweight': '0.223065',\n",
       "   'name': '保利半山花园',\n",
       "   'location': '113.679348,23.627551',\n",
       "   'distance': '146.921',\n",
       "   'tel': [],\n",
       "   'type': '商务住宅;住宅区;住宅区'},\n",
       "  {'id': 'B0HGD588HJ',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '博学路',\n",
       "   'poiweight': '0.221662',\n",
       "   'name': '广州南方学院教学楼4号',\n",
       "   'location': '113.677460,23.630490',\n",
       "   'distance': '242.901',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;学校;学校'},\n",
       "  {'id': 'B0FFIMHNV3',\n",
       "   'direction': '东',\n",
       "   'businessarea': [],\n",
       "   'address': '保利半山花园西北侧110米',\n",
       "   'poiweight': '0.213931',\n",
       "   'name': '汉堡小亨(广州南方学院分店)',\n",
       "   'location': '113.678653,23.628407',\n",
       "   'distance': '38.1716',\n",
       "   'tel': '18825152009',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅'},\n",
       "  {'id': 'B0FFM1K4PF',\n",
       "   'direction': '东',\n",
       "   'businessarea': [],\n",
       "   'address': '保利桃花源(温泉镇中山大学南方学院后门)',\n",
       "   'poiweight': '0.272494',\n",
       "   'name': '南苑小筑沈阳师兄',\n",
       "   'location': '113.678570,23.628390',\n",
       "   'distance': '30.0405',\n",
       "   'tel': '+862126137886,6625081',\n",
       "   'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "  {'id': 'B00140TWHT',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '笃行路2号',\n",
       "   'poiweight': '0.157653',\n",
       "   'name': '教工住宅1号',\n",
       "   'location': '113.678490,23.630432',\n",
       "   'distance': '222.658',\n",
       "   'tel': [],\n",
       "   'type': '商务住宅;住宅区;住宅小区'},\n",
       "  {'id': 'B0FFHRJDM9',\n",
       "   'direction': '东南',\n",
       "   'businessarea': [],\n",
       "   'address': '中大南方学院南门1号',\n",
       "   'poiweight': '0.256152',\n",
       "   'name': '中南公寓',\n",
       "   'location': '113.680340,23.627566',\n",
       "   'distance': '231.223',\n",
       "   'tel': '13711245345',\n",
       "   'type': '商务住宅;住宅区;住宅小区'},\n",
       "  {'id': 'B0HGDU76L2',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '博学路',\n",
       "   'poiweight': '0.221662',\n",
       "   'name': '广州南方学院2号实验楼',\n",
       "   'location': '113.678211,23.630956',\n",
       "   'distance': '280.003',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;学校;学校'},\n",
       "  {'id': 'B0FFHC4XU0',\n",
       "   'direction': '东北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉大道886号',\n",
       "   'poiweight': '0.191595',\n",
       "   'name': '中山大学南方学院学术交流中心',\n",
       "   'location': '113.679959,23.630496',\n",
       "   'distance': '285.635',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "  {'id': 'B0FFLF90I2',\n",
       "   'direction': '东北',\n",
       "   'businessarea': [],\n",
       "   'address': '笃行路20、22、24号广州南方学院商业中心1层1F015',\n",
       "   'poiweight': '0.209448',\n",
       "   'name': '煌上煌酱鸭(广州南方学院店)',\n",
       "   'location': '113.679965,23.630156',\n",
       "   'distance': '256.772',\n",
       "   'tel': '13712317721',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅'},\n",
       "  {'id': 'B0FFKP838K',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '博学路25号',\n",
       "   'poiweight': '0.191742',\n",
       "   'name': '教学楼3号(外国语学院)',\n",
       "   'location': '113.677247,23.630947',\n",
       "   'distance': '298.093',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;学校;高等院校'},\n",
       "  {'id': 'B0FFL7NUA2',\n",
       "   'direction': '东北',\n",
       "   'businessarea': [],\n",
       "   'address': '广州南方学院',\n",
       "   'poiweight': '0.224259',\n",
       "   'name': '湖边纸包鱼',\n",
       "   'location': '113.679861,23.630285',\n",
       "   'distance': '260.939',\n",
       "   'tel': '13924024938',\n",
       "   'type': '餐饮服务;中餐厅;四川菜(川菜)'},\n",
       "  {'id': 'B0IB2GMPW4',\n",
       "   'direction': '东北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉镇笃行路20、22、24号中山大学南方学院商业中心一楼1F-005',\n",
       "   'poiweight': '0.218331',\n",
       "   'name': '古茗(南方学院店)',\n",
       "   'location': '113.680105,23.630681',\n",
       "   'distance': '311.024',\n",
       "   'tel': '18027267535',\n",
       "   'type': '餐饮服务;休闲餐饮场所;休闲餐饮场所'},\n",
       "  {'id': 'B0HGDU8NLD',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '博学路附近',\n",
       "   'poiweight': '0.221662',\n",
       "   'name': '广州南方学院1号实验楼',\n",
       "   'location': '113.678215,23.631370',\n",
       "   'distance': '326.007',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;学校;学校'},\n",
       "  {'id': 'B0HGD58UTU',\n",
       "   'direction': '西北',\n",
       "   'businessarea': [],\n",
       "   'address': '博学路',\n",
       "   'poiweight': '0.191229',\n",
       "   'name': '广州南方学院2号教学楼',\n",
       "   'location': '113.677060,23.631346',\n",
       "   'distance': '346.352',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;学校;学校'},\n",
       "  {'id': 'B0H25SMRKP',\n",
       "   'direction': '东北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉大道882号',\n",
       "   'poiweight': '0.263595',\n",
       "   'name': '广州南方学院大礼堂',\n",
       "   'location': '113.680076,23.631502',\n",
       "   'distance': '386.65',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;会展中心;会展中心'},\n",
       "  {'id': 'B0HGDU92JD',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '博学路19号',\n",
       "   'poiweight': '0.221662',\n",
       "   'name': '广州南方学院教学楼1号',\n",
       "   'location': '113.677077,23.631783',\n",
       "   'distance': '391.548',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;学校;学校'},\n",
       "  {'id': 'B0HGD592BJ',\n",
       "   'direction': '东北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉大道886号广州南方学院内',\n",
       "   'poiweight': '0.221662',\n",
       "   'name': '广州南方学院综合楼',\n",
       "   'location': '113.680117,23.631544',\n",
       "   'distance': '392.731',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;学校;学校'},\n",
       "  {'id': 'B0FFKP81F0',\n",
       "   'direction': '西北',\n",
       "   'businessarea': [],\n",
       "   'address': '博学路与中山路交叉口南340米',\n",
       "   'poiweight': '0.191742',\n",
       "   'name': '教学楼1号(文学与传媒学院)',\n",
       "   'location': '113.676866,23.631736',\n",
       "   'distance': '393.93',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "  {'id': 'B0FFLBEOND',\n",
       "   'direction': '东北',\n",
       "   'businessarea': [],\n",
       "   'address': '从莞深高速(广州南方学院)',\n",
       "   'poiweight': '0.190963',\n",
       "   'name': '聚贤楼10号',\n",
       "   'location': '113.681253,23.631036',\n",
       "   'distance': '418.51',\n",
       "   'tel': [],\n",
       "   'type': '商务住宅;住宅区;宿舍'},\n",
       "  {'id': 'B0FFH6K3U9',\n",
       "   'direction': '西北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉镇温泉大道882号广州南方学院H7栋1-5层',\n",
       "   'poiweight': '0.254885',\n",
       "   'name': '广州中大南方招待所',\n",
       "   'location': '113.676330,23.631332',\n",
       "   'distance': '378.102',\n",
       "   'tel': '020-61787222',\n",
       "   'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "  {'id': 'B0HGD58NF8',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉大道882号广州南方学院新综合楼2层',\n",
       "   'poiweight': '0.191229',\n",
       "   'name': '广州南方学院达人书院',\n",
       "   'location': '113.679041,23.632392',\n",
       "   'distance': '446.366',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "  {'id': 'B0FFKUVYWV',\n",
       "   'direction': '东北',\n",
       "   'businessarea': [],\n",
       "   'address': '保利桃花源',\n",
       "   'poiweight': '0.273168',\n",
       "   'name': '广州和风庭阿七度假别墅',\n",
       "   'location': '113.681736,23.630569',\n",
       "   'distance': '424.35',\n",
       "   'tel': '+862126137886,4618482',\n",
       "   'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "  {'id': 'B0FFIXV3OZ',\n",
       "   'direction': '西北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉镇广州南方学院博学路6号',\n",
       "   'poiweight': '0.182221',\n",
       "   'name': '广州南方学院第一食堂',\n",
       "   'location': '113.675848,23.631818',\n",
       "   'distance': '450.091',\n",
       "   'tel': [],\n",
       "   'type': '餐饮服务;中餐厅;中餐厅'},\n",
       "  {'id': 'B0FFL7C054',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉镇博学路882号(广州南方学院商业中心1层)',\n",
       "   'poiweight': '0.317505',\n",
       "   'name': '广州U优森特酒店',\n",
       "   'location': '113.679226,23.632528',\n",
       "   'distance': '464.819',\n",
       "   'tel': '15813395296',\n",
       "   'type': '住宿服务;住宿服务相关;住宿服务相关'},\n",
       "  {'id': 'B0HGDU92JC',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '博学路附近',\n",
       "   'poiweight': '0.221662',\n",
       "   'name': '广州南方学院4号实验楼',\n",
       "   'location': '113.679963,23.632652',\n",
       "   'distance': '498.883',\n",
       "   'tel': [],\n",
       "   'type': '科教文化服务;学校;学校'},\n",
       "  {'id': 'B0HGDU99RM',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉大道882号广州南方学院内',\n",
       "   'poiweight': '0.257947',\n",
       "   'name': '广州南方学院图书馆',\n",
       "   'location': '113.679177,23.632762',\n",
       "   'distance': '489.331',\n",
       "   'tel': '020-61787368;020-61787371',\n",
       "   'type': '科教文化服务;图书馆;图书馆'},\n",
       "  {'id': 'B0FFHHKASW',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '温泉镇广州南方学院后门润泰超市1层',\n",
       "   'poiweight': '0.210069',\n",
       "   'name': '栗子家蛋糕店',\n",
       "   'location': '113.679283,23.632574',\n",
       "   'distance': '471.03',\n",
       "   'tel': [],\n",
       "   'type': '餐饮服务;糕饼店;糕饼店'},\n",
       "  {'id': 'B0FFK28XPU',\n",
       "   'direction': '北',\n",
       "   'businessarea': [],\n",
       "   'address': '博学路广州南方学院后门润泰超市首层23号',\n",
       "   'poiweight': '0.213875',\n",
       "   'name': '我家厨房',\n",
       "   'location': '113.679291,23.632563',\n",
       "   'distance': '470.033',\n",
       "   'tel': [],\n",
       "   'type': '餐饮服务;中餐厅;中餐厅'}]}"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "NFU[\"regeocode\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "id": "7cbd1d62",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['roads', 'roadinters', 'formatted_address', 'addressComponent', 'aois', 'pois'])"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "NFU[\"regeocode\"].keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "4b912b0b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[{'id': 'B00140MR9A', 'direction': '北', 'businessarea': [], 'address': '温泉大道882号', 'poiweight': '0.450402', 'name': '广州南方学院', 'location': '113.679257,23.632577', 'distance': '470.792', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFG4TAF2', 'direction': '东南', 'businessarea': [], 'address': '温泉镇乌土村松浪队5号(近博学路)', 'poiweight': '0.237309', 'name': '广州南方公寓', 'location': '113.678983,23.627778', 'distance': '102.617', 'tel': '13622768437', 'type': '商务住宅;商务住宅相关;商务住宅相关'}, {'id': 'B0H6FA18J5', 'direction': '东南', 'businessarea': [], 'address': '从莞深高速(广州南方学院南侧)', 'poiweight': '0.223065', 'name': '保利半山花园', 'location': '113.679348,23.627551', 'distance': '146.921', 'tel': [], 'type': '商务住宅;住宅区;住宅区'}, {'id': 'B0HGD588HJ', 'direction': '北', 'businessarea': [], 'address': '博学路', 'poiweight': '0.221662', 'name': '广州南方学院教学楼4号', 'location': '113.677460,23.630490', 'distance': '242.901', 'tel': [], 'type': '科教文化服务;学校;学校'}, {'id': 'B0FFIMHNV3', 'direction': '东', 'businessarea': [], 'address': '保利半山花园西北侧110米', 'poiweight': '0.213931', 'name': '汉堡小亨(广州南方学院分店)', 'location': '113.678653,23.628407', 'distance': '38.1716', 'tel': '18825152009', 'type': '餐饮服务;快餐厅;快餐厅'}, {'id': 'B0FFM1K4PF', 'direction': '东', 'businessarea': [], 'address': '保利桃花源(温泉镇中山大学南方学院后门)', 'poiweight': '0.272494', 'name': '南苑小筑沈阳师兄', 'location': '113.678570,23.628390', 'distance': '30.0405', 'tel': '+862126137886,6625081', 'type': '住宿服务;住宿服务相关;住宿服务相关'}, {'id': 'B00140TWHT', 'direction': '北', 'businessarea': [], 'address': '笃行路2号', 'poiweight': '0.157653', 'name': '教工住宅1号', 'location': '113.678490,23.630432', 'distance': '222.658', 'tel': [], 'type': '商务住宅;住宅区;住宅小区'}, {'id': 'B0FFHRJDM9', 'direction': '东南', 'businessarea': [], 'address': '中大南方学院南门1号', 'poiweight': '0.256152', 'name': '中南公寓', 'location': '113.680340,23.627566', 'distance': '231.223', 'tel': '13711245345', 'type': '商务住宅;住宅区;住宅小区'}, {'id': 'B0HGDU76L2', 'direction': '北', 'businessarea': [], 'address': '博学路', 'poiweight': '0.221662', 'name': '广州南方学院2号实验楼', 'location': '113.678211,23.630956', 'distance': '280.003', 'tel': [], 'type': '科教文化服务;学校;学校'}, {'id': 'B0FFHC4XU0', 'direction': '东北', 'businessarea': [], 'address': '温泉大道886号', 'poiweight': '0.191595', 'name': '中山大学南方学院学术交流中心', 'location': '113.679959,23.630496', 'distance': '285.635', 'tel': [], 'type': '科教文化服务;科教文化场所;科教文化场所'}, {'id': 'B0FFLF90I2', 'direction': '东北', 'businessarea': [], 'address': '笃行路20、22、24号广州南方学院商业中心1层1F015', 'poiweight': '0.209448', 'name': '煌上煌酱鸭(广州南方学院店)', 'location': '113.679965,23.630156', 'distance': '256.772', 'tel': '13712317721', 'type': '餐饮服务;快餐厅;快餐厅'}, {'id': 'B0FFKP838K', 'direction': '北', 'businessarea': [], 'address': '博学路25号', 'poiweight': '0.191742', 'name': '教学楼3号(外国语学院)', 'location': '113.677247,23.630947', 'distance': '298.093', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFL7NUA2', 'direction': '东北', 'businessarea': [], 'address': '广州南方学院', 'poiweight': '0.224259', 'name': '湖边纸包鱼', 'location': '113.679861,23.630285', 'distance': '260.939', 'tel': '13924024938', 'type': '餐饮服务;中餐厅;四川菜(川菜)'}, {'id': 'B0IB2GMPW4', 'direction': '东北', 'businessarea': [], 'address': '温泉镇笃行路20、22、24号中山大学南方学院商业中心一楼1F-005', 'poiweight': '0.218331', 'name': '古茗(南方学院店)', 'location': '113.680105,23.630681', 'distance': '311.024', 'tel': '18027267535', 'type': '餐饮服务;休闲餐饮场所;休闲餐饮场所'}, {'id': 'B0HGDU8NLD', 'direction': '北', 'businessarea': [], 'address': '博学路附近', 'poiweight': '0.221662', 'name': '广州南方学院1号实验楼', 'location': '113.678215,23.631370', 'distance': '326.007', 'tel': [], 'type': '科教文化服务;学校;学校'}, {'id': 'B0HGD58UTU', 'direction': '西北', 'businessarea': [], 'address': '博学路', 'poiweight': '0.191229', 'name': '广州南方学院2号教学楼', 'location': '113.677060,23.631346', 'distance': '346.352', 'tel': [], 'type': '科教文化服务;学校;学校'}, {'id': 'B0H25SMRKP', 'direction': '东北', 'businessarea': [], 'address': '温泉大道882号', 'poiweight': '0.263595', 'name': '广州南方学院大礼堂', 'location': '113.680076,23.631502', 'distance': '386.65', 'tel': [], 'type': '科教文化服务;会展中心;会展中心'}, {'id': 'B0HGDU92JD', 'direction': '北', 'businessarea': [], 'address': '博学路19号', 'poiweight': '0.221662', 'name': '广州南方学院教学楼1号', 'location': '113.677077,23.631783', 'distance': '391.548', 'tel': [], 'type': '科教文化服务;学校;学校'}, {'id': 'B0HGD592BJ', 'direction': '东北', 'businessarea': [], 'address': '温泉大道886号广州南方学院内', 'poiweight': '0.221662', 'name': '广州南方学院综合楼', 'location': '113.680117,23.631544', 'distance': '392.731', 'tel': [], 'type': '科教文化服务;学校;学校'}, {'id': 'B0FFKP81F0', 'direction': '西北', 'businessarea': [], 'address': '博学路与中山路交叉口南340米', 'poiweight': '0.191742', 'name': '教学楼1号(文学与传媒学院)', 'location': '113.676866,23.631736', 'distance': '393.93', 'tel': [], 'type': '科教文化服务;科教文化场所;科教文化场所'}, {'id': 'B0FFLBEOND', 'direction': '东北', 'businessarea': [], 'address': '从莞深高速(广州南方学院)', 'poiweight': '0.190963', 'name': '聚贤楼10号', 'location': '113.681253,23.631036', 'distance': '418.51', 'tel': [], 'type': '商务住宅;住宅区;宿舍'}, {'id': 'B0FFH6K3U9', 'direction': '西北', 'businessarea': [], 'address': '温泉镇温泉大道882号广州南方学院H7栋1-5层', 'poiweight': '0.254885', 'name': '广州中大南方招待所', 'location': '113.676330,23.631332', 'distance': '378.102', 'tel': '020-61787222', 'type': '住宿服务;住宿服务相关;住宿服务相关'}, {'id': 'B0HGD58NF8', 'direction': '北', 'businessarea': [], 'address': '温泉大道882号广州南方学院新综合楼2层', 'poiweight': '0.191229', 'name': '广州南方学院达人书院', 'location': '113.679041,23.632392', 'distance': '446.366', 'tel': [], 'type': '科教文化服务;科教文化场所;科教文化场所'}, {'id': 'B0FFKUVYWV', 'direction': '东北', 'businessarea': [], 'address': '保利桃花源', 'poiweight': '0.273168', 'name': '广州和风庭阿七度假别墅', 'location': '113.681736,23.630569', 'distance': '424.35', 'tel': '+862126137886,4618482', 'type': '住宿服务;住宿服务相关;住宿服务相关'}, {'id': 'B0FFIXV3OZ', 'direction': '西北', 'businessarea': [], 'address': '温泉镇广州南方学院博学路6号', 'poiweight': '0.182221', 'name': '广州南方学院第一食堂', 'location': '113.675848,23.631818', 'distance': '450.091', 'tel': [], 'type': '餐饮服务;中餐厅;中餐厅'}, {'id': 'B0FFL7C054', 'direction': '北', 'businessarea': [], 'address': '温泉镇博学路882号(广州南方学院商业中心1层)', 'poiweight': '0.317505', 'name': '广州U优森特酒店', 'location': '113.679226,23.632528', 'distance': '464.819', 'tel': '15813395296', 'type': '住宿服务;住宿服务相关;住宿服务相关'}, {'id': 'B0HGDU92JC', 'direction': '北', 'businessarea': [], 'address': '博学路附近', 'poiweight': '0.221662', 'name': '广州南方学院4号实验楼', 'location': '113.679963,23.632652', 'distance': '498.883', 'tel': [], 'type': '科教文化服务;学校;学校'}, {'id': 'B0HGDU99RM', 'direction': '北', 'businessarea': [], 'address': '温泉大道882号广州南方学院内', 'poiweight': '0.257947', 'name': '广州南方学院图书馆', 'location': '113.679177,23.632762', 'distance': '489.331', 'tel': '020-61787368;020-61787371', 'type': '科教文化服务;图书馆;图书馆'}, {'id': 'B0FFHHKASW', 'direction': '北', 'businessarea': [], 'address': '温泉镇广州南方学院后门润泰超市1层', 'poiweight': '0.210069', 'name': '栗子家蛋糕店', 'location': '113.679283,23.632574', 'distance': '471.03', 'tel': [], 'type': '餐饮服务;糕饼店;糕饼店'}, {'id': 'B0FFK28XPU', 'direction': '北', 'businessarea': [], 'address': '博学路广州南方学院后门润泰超市首层23号', 'poiweight': '0.213875', 'name': '我家厨房', 'location': '113.679291,23.632563', 'distance': '470.033', 'tel': [], 'type': '餐饮服务;中餐厅;中餐厅'}]\n"
     ]
    }
   ],
   "source": [
    "# 找到目标\n",
    "# 1.请问：NFU_pois 有多少个数据\n",
    "# 2.让我看一看第10个数据长什么样 列表的取值\n",
    "# 3.取值:取出第十个数据中的name\n",
    "# 4.让我看看这些数据所有的名称name都是什么\n",
    "# 5.请大家找出direction 朝北的所有 name 加上条件判断\n",
    "# 6. 请大家找出 有tel的name\n",
    "NFU_pois = NFU[\"regeocode\"][\"pois\"]\n",
    "# NFU_pois\n",
    "print(NFU_pois)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "5ac2ef42",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "30"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# NFU_pois有多少个数据\n",
    "len(NFU_pois)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "6d2d3577",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'id': 'B0FFHC4XU0',\n",
       " 'direction': '东北',\n",
       " 'businessarea': [],\n",
       " 'address': '温泉大道886号',\n",
       " 'poiweight': '0.191595',\n",
       " 'name': '中山大学南方学院学术交流中心',\n",
       " 'location': '113.679959,23.630496',\n",
       " 'distance': '285.635',\n",
       " 'tel': [],\n",
       " 'type': '科教文化服务;科教文化场所;科教文化场所'}"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 第10个数据长什么样\n",
    "NFU_pois[9]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "93be53c4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'中山大学南方学院学术交流中心'"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 取出第10个数据的name\n",
    "NFU_pois[9][\"name\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "6c69c207",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "广州南方学院\n",
      "广州南方公寓\n",
      "保利半山花园\n",
      "广州南方学院教学楼4号\n",
      "汉堡小亨(广州南方学院分店)\n",
      "南苑小筑沈阳师兄\n",
      "教工住宅1号\n",
      "中南公寓\n",
      "广州南方学院2号实验楼\n",
      "中山大学南方学院学术交流中心\n",
      "煌上煌酱鸭(广州南方学院店)\n",
      "教学楼3号(外国语学院)\n",
      "湖边纸包鱼\n",
      "古茗(南方学院店)\n",
      "广州南方学院1号实验楼\n",
      "广州南方学院2号教学楼\n",
      "广州南方学院大礼堂\n",
      "广州南方学院教学楼1号\n",
      "广州南方学院综合楼\n",
      "教学楼1号(文学与传媒学院)\n",
      "聚贤楼10号\n",
      "广州中大南方招待所\n",
      "广州南方学院达人书院\n",
      "广州和风庭阿七度假别墅\n",
      "广州南方学院第一食堂\n",
      "广州U优森特酒店\n",
      "广州南方学院4号实验楼\n",
      "广州南方学院图书馆\n",
      "栗子家蛋糕店\n",
      "我家厨房\n"
     ]
    }
   ],
   "source": [
    "# 让我看看这些数据所有的名称name都是什么\n",
    "for i in range(30):\n",
    "    print(NFU_pois[i][\"name\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "id": "5dcd13b9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "广州南方学院\n",
      "广州南方学院教学楼4号\n",
      "教工住宅1号\n",
      "广州南方学院2号实验楼\n",
      "教学楼3号(外国语学院)\n",
      "广州南方学院1号实验楼\n",
      "广州南方学院教学楼1号\n",
      "广州南方学院达人书院\n",
      "广州U优森特酒店\n",
      "广州南方学院4号实验楼\n",
      "广州南方学院图书馆\n",
      "栗子家蛋糕店\n",
      "我家厨房\n"
     ]
    }
   ],
   "source": [
    "# 找出direction 朝北的所有 name 加上条件判断\n",
    "for i in range(30):\n",
    "    if NFU_pois[i][\"direction\"] == \"北\":\n",
    "        print(NFU_pois[i][\"name\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "id": "2423ec2a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "广州南方学院2号教学楼\n",
      "教学楼1号(文学与传媒学院)\n",
      "广州中大南方招待所\n",
      "广州南方学院第一食堂\n"
     ]
    }
   ],
   "source": [
    "# 找出direction 朝西北的所有 name 加上条件判断\n",
    "for i in range(30):\n",
    "    if NFU_pois[i][\"direction\"] == \"西北\":\n",
    "        print(NFU_pois[i][\"name\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "2c6d6135",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "广州南方公寓\n",
      "汉堡小亨(广州南方学院分店)\n",
      "南苑小筑沈阳师兄\n",
      "中南公寓\n",
      "煌上煌酱鸭(广州南方学院店)\n",
      "湖边纸包鱼\n",
      "古茗(南方学院店)\n",
      "广州中大南方招待所\n",
      "广州和风庭阿七度假别墅\n",
      "广州U优森特酒店\n",
      "广州南方学院图书馆\n"
     ]
    }
   ],
   "source": [
    "# 6.请大家找出 有tel的name\n",
    "for i in range(30):\n",
    "    if NFU_pois[i][\"tel\"] != []:\n",
    "        print(NFU_pois[i][\"name\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b8f3a56f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
